<template>
	<view class="page">
		<u-navbar title="账号安全" autoBack fixed placeholder titleStyle="color: #232832" leftIconColor="#232832"
			bgColor="#FFFFFF"></u-navbar>
		<c-content :top="statusBarHeight + 44" bgColor="#F4F4F7">
			<u-gap height="10px" bgColor="transparent"></u-gap>
			<view class="cell" v-for="(menu, i) in menus" :key="i" @click="goMenu(menu)">
				<view class="cell-item__icon">
					<text :class="menu.icon"></text>
				</view>
				<view class="cell-item__title">{{ menu.title }}</view>
				<view class="cell-item__value">
					<u-icon v-if="menu.valueType == 'icon'" name="arrow-right" color="#232832"></u-icon>
				</view>
			</view>
		</c-content>
	</view>
</template>

<script>
	import mixins from '@/mixins/index.js'
	export default {
		mixins: [mixins],
		data() {
			return {
				menus: [{
						icon: 'icon-mobile',
						title: '手机号',
						valueType: 'icon',
						value: '',
						url: '/pages/common/verify?type=0'
					},
					{
						icon: 'icon-password',
						title: '密码设置',
						valueType: 'icon',
						value: '',
						url: '/pages/common/verify?type=1'
					}
				]
			}
		},
		methods: {
			goMenu(menu) {
				if (menu.url) {
					uni.navigateTo({
						url: menu.url
					})
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.cell {
		display: flex;
		align-items: center;
		background-color: #FFFFFF;
		padding: 10px 22px;
		border-bottom: 1px solid #F4F4F7;

		&-item__icon {
			margin-right: 13px;
			color: #232832;
		}

		&-item__title {
			flex: 1;
			color: #232832;
			font-size: 15px;
			line-height: 23px;
			font-weight: 400;
		}

		&-item__value {
			color: #666666;
			font-size: 13px;
			line-height: 18px;
			font-weight: 400;
		}
	}
</style>